<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登入 - 啄木鸟</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
    >
    <!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
    <script th:src="${SYS_RES}+'/static/lay/layui/layui.min.js'"></script>
</head>
<body>

</body>
<script>
    layui.define(['form','layer'], function(){
        let $ = layui.$;
        let layer = layui.layer;
        var json = {};
        json.authCode = "[[${authCode}]]";
        json.cubeFlag = "[[${cubeFlag}]]"
        var ajaxUrl = '/cas/authCodeLogin.action';
        var data = {};
        data.authCode = json.authCode;
        if (json.cubeFlag != null && json.cubeFlag != "") {
            data.cubeFlag = true;
        }
        $.ajax({
            async: false,
            type: "POST",
            url: ajaxUrl,
            contentType: "application/json",
            data: JSON.stringify(data),
            dataType: "json",
            success: function (json_) {
                if (json_.status == 200) {
                    console.log(json_);
                    args = json_;
                    window.location.href = json_.id;
                } else {
                    layer.msg(json_.message);
                }
                return false;
            }
        })
    })


</script>
</html>